/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: LightOnCommand
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2022/1/4 11:28
 * @version: 1.0
 */
public class LightOnCommand implements Command{


    /** 聚合 */
    private LightReceiver light;

    /** 构造器 */
    public LightOnCommand(LightReceiver light) {
        super();
        this.light = light;
    }


    public void execute() {
        light.on();
    }

    public void undo() {
        light.off();
    }
}
